Optimal. Leaf size=98 \[ \frac {5 a \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec (c+d x) \tan (c+d x)}{16 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3567, 3853,
3855} \begin {gather*} \frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {a \tan (c+d x) \sec ^5(c+d x)}{6 d}+\frac {5 a \tan (c+d x) \sec ^3(c+d x)}{24 d}+\frac {5 a \tan (c+d x) \sec (c+d x)}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3567
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \sec ^7(c+d x) (a+i a \tan (c+d x)) \, dx &=\frac {i a \sec ^7(c+d x)}{7 d}+a \int \sec ^7(c+d x) \, dx\\ &=\frac {i a \sec ^7(c+d x)}{7 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{6} (5 a) \int \sec ^5(c+d x) \, dx\\ &=\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{8} (5 a) \int \sec ^3(c+d x) \, dx\\ &=\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec (c+d x) \tan (c+d x)}{16 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{16} (5 a) \int \sec (c+d x) \, dx\\ &=\frac {5 a \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec (c+d x) \tan (c+d x)}{16 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.36, size = 61, normalized size = 0.62 \begin {gather*} \frac {a \left (3360 \tanh ^{-1}(\sin (c+d x))+\sec ^7(c+d x) (1536 i+1981 \sin (2 (c+d x))+700 \sin (4 (c+d x))+105 \sin (6 (c+d x)))\right )}{10752 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 74, normalized size = 0.76
method | result | size |
derivativedivides | \(\frac {\frac {i a}{7 \cos \left (d x +c \right )^{7}}+a \left (-\left (-\frac {\left (\sec ^{5}\left (d x +c \right )\right )}{6}-\frac {5 \left (\sec ^{3}\left (d x +c \right )\right )}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) | \(74\) |
default | \(\frac {\frac {i a}{7 \cos \left (d x +c \right )^{7}}+a \left (-\left (-\frac {\left (\sec ^{5}\left (d x +c \right )\right )}{6}-\frac {5 \left (\sec ^{3}\left (d x +c \right )\right )}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) | \(74\) |
risch | \(-\frac {i a \left (105 \,{\mathrm e}^{13 i \left (d x +c \right )}+700 \,{\mathrm e}^{11 i \left (d x +c \right )}+1981 \,{\mathrm e}^{9 i \left (d x +c \right )}-3072 \,{\mathrm e}^{7 i \left (d x +c \right )}-1981 \,{\mathrm e}^{5 i \left (d x +c \right )}-700 \,{\mathrm e}^{3 i \left (d x +c \right )}-105 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{168 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}-\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 d}+\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 d}\) | \(138\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 106, normalized size = 1.08 \begin {gather*} -\frac {7 \, a {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac {96 i \, a}{\cos \left (d x + c\right )^{7}}}{672 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 372 vs. \(2 (86) = 172\).
time = 0.39, size = 372, normalized size = 3.80 \begin {gather*} \frac {-210 i \, a e^{\left (13 i \, d x + 13 i \, c\right )} - 1400 i \, a e^{\left (11 i \, d x + 11 i \, c\right )} - 3962 i \, a e^{\left (9 i \, d x + 9 i \, c\right )} + 6144 i \, a e^{\left (7 i \, d x + 7 i \, c\right )} + 3962 i \, a e^{\left (5 i \, d x + 5 i \, c\right )} + 1400 i \, a e^{\left (3 i \, d x + 3 i \, c\right )} + 210 i \, a e^{\left (i \, d x + i \, c\right )} + 105 \, {\left (a e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, a e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, a e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, a e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 105 \, {\left (a e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, a e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, a e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, a e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{336 \, {\left (d e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- i \sec ^{7}{\left (c + d x \right )}\right )\, dx + \int \tan {\left (c + d x \right )} \sec ^{7}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 181 vs. \(2 (86) = 172\).
time = 0.54, size = 181, normalized size = 1.85 \begin {gather*} \frac {105 \, a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 105 \, a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) + \frac {2 \, {\left (231 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} - 336 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 196 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 595 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 1680 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 595 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1008 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 196 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 231 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 48 i \, a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7}}}{336 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.37, size = 247, normalized size = 2.52 \begin {gather*} \frac {5\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {-\frac {11\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{8}+2{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{6}-\frac {85\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}+10{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\frac {85\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{24}+6{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}+\frac {11\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}+\frac {a\,2{}\mathrm {i}}{7}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________